// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import "babel-polyfill";
import ElementUI from 'element-ui'
import 'font-awesome/less/font-awesome.less'
import 'element-ui/lib/theme-chalk/index.css' // 样式文件需要单独引入
import './style/reset.less'
import './style/base.less'
import './components'
import {register} from './utilities/app'
import router from './router'
import {mapActions} from 'vuex'
import store from './store'
import './services/resource.js'
import $ from 'jquery'
Vue.use(ElementUI)

// 关闭生产模式下给出的提示
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
  el: '#app',
  store,
  router,
  data: () => ({
    alerts: [],
    toasts: []
  }),
  methods: {
    ...mapActions(['setModules', 'setUser', 'setToken', 'setUserInfo','setUserType'])
  },
  beforeCreate () {
    register(this)
  },
  render (h) {
    return h(
      'div',
      {
        attrs: {id: 'app'}
      },
      [h('router-view')]
    )
  }
})
